<?php

class EmbeddedMembershipFeePaymentForm extends BaseMembershipFeePaymentForm
{

  public function configure ()
  {
    parent::configure();
    
    unset($this['year']);
    
    // Overwrite widgets
    $this->widgetSchema['date_of_payment'] = new sfWidgetFormDateJQueryUI(array(
      "change_month" => true, "change_year" => true));
    $this->widgetSchema['reference'] = new sfWidgetFormInputText();
    $this->widgetSchema['member_id'] = new sfWidgetFormInputHidden();
    
    // set labels
    $this->widgetSchema->setLabels(array(
      'date_of_payment' => 'Zahlungsdatum', 'reference' => 'Referenz'));
  }

  /**
   * Get related member object
   * @return Member
   */
  public function getMember ()
  {
    return $this->getOption('member', null);
  }
}